package com.hs.srm.admin.modules.requisition.service;

import com.baomidou.mybatisplus.service.IService;
import com.hs.srm.admin.modules.requisition.entity.NproPurchRequestItemEntity;
import com.hs.srm.admin.modules.requisition.vo.SupplyGoodsEntityVO;
import com.hs.srm.common.utils.PageUtils;
import com.landray.kmss.km.review.webservice.Exception_Exception;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public interface NproPurchRequestItemService extends IService<NproPurchRequestItemEntity> {

    //申请采购明细
    PageUtils queryPage(Map<String, Object> params);

    //根据采购单号来查询对应的实体
    List<NproPurchRequestItemEntity> findByNo(String purchRequestCode, List<String> ids);

    //根据id查询行项目
    NproPurchRequestItemEntity selectById(@Param("pkId") String pkId);

    //根据采购编号查询行项目的数据
    List<NproPurchRequestItemEntity> selectBatchIds(List<String> ids);

    //查询所有的申请明细
    List<NproPurchRequestItemEntity> selectRequestItem();

    List<Map<String, String>> selectUserMapList(List<String> ids);

    List<SupplyGoodsEntityVO> findById(ArrayList<String> idsarrayList);

    public PageUtils selectDetailPage(Map<String, Object> params);

    //改变货源状态
    boolean changeGoodsStatus(int goodsStatus, String npkId);

    //修改
    NproPurchRequestItemEntity findbypkId(String pkid);

    void updateAll(NproPurchRequestItemEntity nproPurchRequestItemEntity);

    //通过请购编码、请购行项目编码将请购单恢复草稿状态
    void updateStatus(String requestCode, String purchRequestItemCode);

    //删除非生产性请购单
    String deleteRequisition(String[] pkIds, String requestCode, String reason) throws Exception_Exception;

    NproPurchRequestItemEntity selectNproItem(String purchRequestCode, String purchRequestItemCode);
}
